home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!netnews
- From: swampwiz@ix.netcom.com(Jean P. Laborde )
- Newsgroups: comp.lang.c++
- Subject: Re: Anyone have any C++ programing challenges for me????
- Date: 6 Feb 1996 00:03:34 GMT
- Organization: Netcom
- Message-ID: <4f65sm$h3@ixnews2.ix.netcom.com>
- References: <4f5rl3$jue@newsbf02.news.aol.com>
- NNTP-Posting-Host: ix-no1-10.ix.netcom.com
- X-NETCOM-Date: Mon Feb 05 4:03:34 PM PST 1996
-
- In <4f5rl3$jue@newsbf02.news.aol.com> diemacdie@aol.com (Diemacdie)
- writes:
- >
- >I'm looking for ideas for programs to work on. I am a high school
- senior
- >and I'm looking to learn as much as I can about c++ for next year.
- Thanx
-
- Here's a good one.
-
- Build classes for the following:
-
- BigInt
-
- BigReal
-
- String
-
- BigInt will store a huge integer. Bigreal will store a huge real # (it
- will have two BigInt's - the significant digits & the exponent. The
- String will deal with character strings the way they should be (will
- take of the dynamic memory, etc.)
-
- with the proper function, you could
-
- BigInt i(12321932081293812739);
- BigInt j=2*i;
- j*=(j-i*i);
- cout << i << " " << j;
- //etc.
-
- String name2("Diemacdie");
- String name1("John");
- String name3=name1+" "+name2;
- cout << name; (would print 'John Diemacdie');
-
- <or>
-
- if(name2==name3){ ~~~ } // can't do this with char* !
-
- This is the stuff I had to do for my projects in C++ courses. If you
- could do this you'll be on your way to being a good C++ programmer.
-
-
-